package leetcode.editor.cn.q0xx

class Q70 {
    fun climbStairs(n: Int): Int {
        var p = 0
        var q = 0
        var r = 1
        for (i in 1..n) {
            p = q
            q = r
            r = p + q
        }
        return r
    }
}